package org.ht.combotable;

import java.util.Vector;

import javax.swing.table.DefaultTableModel;

import org.ht.util.CaseUtil;

/**
 * This is an implementation of <code>TableModel</code> that uses a
 * <code>Vector</code> of <code>Vectors</code> to store the cell value objects.
 * 
 * @author zeyuphoenix <br>
 *         daily jtable.tableheadertest MyTableModel.java <br>
 *         2008 2008/03/28 10:55:51 <br>
 */
public class ComboTableModel extends DefaultTableModel {

	/**
	 * UID.
	 */
	private static final long serialVersionUID = 1L;

	public ComboTableModel() {
		super();
	}

	public ComboTableModel(int rowCount, int columnCount) {
		super(rowCount, columnCount);
		// TODO Auto-generated constructor stub
	}

	public ComboTableModel(Object[] columnNames, int rowCount) {
		super(columnNames, rowCount);
		// TODO Auto-generated constructor stub
	}

	public ComboTableModel(Object[][] data, Object[] columnNames) {
		super(data, columnNames);
		// TODO Auto-generated constructor stub
	}

	public ComboTableModel(Vector columnNames, int rowCount) {
		super(columnNames, rowCount);
		// TODO Auto-generated constructor stub
	}

	public ComboTableModel(Vector data, Vector columnNames) {
		super(data, columnNames);
		// TODO Auto-generated constructor stub
	}

	/**
	 * Returns true regardless of parameter values.
	 * 
	 * @param row
	 *            the row whose value is to be queried
	 * @param column
	 *            the column whose value is to be queried
	 * @return false
	 * @see #setValueAt
	 */
	public boolean isCellEditable(int row, int column) {
		return false;
	}

	/**
	 * 处理Vector,对Vector进行包装转换
	 */
	@Override
	public void addRow(Vector rowData) {
		super.addRow(CaseUtil.convertRow(rowData));
	}
}
